import { useEffect, useRef } from 'react';
import Viewer from 'viewerjs';
const ImageViews: React.FC = ({ children }) => {
    const containerEle = useRef(null);
    useEffect(() => {
        const viewer = new Viewer(containerEle.current as never as HTMLElement);
        return () => {
            viewer.destroy();
        }
    }, [children])
    return <div ref={containerEle}>{children}</div>;
}
export default ImageViews